<?php
 require_once("base_connector.php"); class FormDataItem extends DataItem{ function to_xml(){ if ($this->skip) return ""; $str=""; for ($i = 0; $i < count($this->config->data); $i++) { $str .= "<".$this->config->data[$i]['name']."><![CDATA[".$this->data[$this->config->data[$i]['name']]."]]></".$this->config->data[$i]['name'].">"; } return $str; } } class FormConnector extends Connector{ public function __construct($res,$type=false,$item_type=false,$data_type=false){ if (!$item_type) $item_type="FormDataItem"; if (!$data_type) $data_type="FormDataProcessor"; parent::__construct($res,$type,$item_type,$data_type); } function parse_request(){ parent::parse_request(); if (isset($_GET["id"])) $this->request->set_filter($this->config->id["name"],$_GET["id"],"="); else if (!$_POST["ids"]) throw new Exception("ID parameter is missed"); } } class FormDataProcessor extends DataProcessor{ } ?>